const sab = new SharedArrayBuffer (1024);
const ta = new Uint8Array (sab);
ta [0];
ta [0] = 5;
var v1 = Atomics.add (ta, 0, 12);
console.log (v1);
console.log (typeof (v1));
var v2 = Atomics.load (ta, 0);
console.log (v2);
console.log (typeof (v2));
var v3 = Atomics.and (ta, 0, 1);
console.log (v3);
console.log (typeof (v3));
v2 = Atomics.load (ta, 0);
var v4 = Atomics.compareExchange (ta, 0, 5, 12);
console.log (v4);
console.log (typeof (v4));
v2 = Atomics.load (ta, 0);
var v5 = Atomics.exchange (ta, 0, 12);
console.log (v5);
console.log (typeof (v5));
v2 = Atomics.load (ta, 0);
var v6 = Atomics.isLockFree (1);
console.log (v6);
console.log (typeof (v6));
Atomics.isLockFree (2);
Atomics.isLockFree (3);
Atomics.isLockFree (4);
var v7 = Atomics.or (ta, 0, 1);
console.log (v7);
console.log (typeof (v7));
v2 = Atomics.load (ta, 0);
var v8 = Atomics.store (ta, 0, 12);
console.log (v8);
console.log (typeof (v8));
var v9 = Atomics.sub (ta, 0, 2);
console.log (v9);
console.log (typeof (v9));
v2 = Atomics.load (ta, 0);
var v10 = Atomics.xor (ta, 0, 1);
console.log (v10);
console.log (typeof (v10));
Atomics.load (ta, 0);
const int32 = new Int32Array (sab);
var v11 = Atomics.wait (int32, 0, 0);
console.log (v11);
console.log (typeof (v11));
